package com.luo.wheresmytakeaway.controller;

import com.luo.wheresmytakeaway.pojo.Results;
import com.luo.wheresmytakeaway.service.MerchantService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class MerchantController {
    @Autowired
    private MerchantService merchantService;

    @GetMapping("/home")
    public Results getMerchantList() {
        return Results.success(merchantService.getMerchantList());
    }

}
